import Vue from 'vue'
import VueRouter from 'vue-router'
// import Index from '@views/Index'
// import Login from '@views/Login'
// import Home from '@views/Home'


import Index from '../views/index'
import Login from '../views/Login'
import Home from '../views/Home'
import Purchase from '../views/Purchase'

Vue.use(VueRouter)

const routes = [
    {
        path: "/",
        redirect: '/home',
        name: 'home',
        component: Index,
        children: [
            {
                path: 'home',
                component: Home
            },
            {
                path: 'purchase',
                component: Purchase
            }
        ],
    },
    {
        path: '/login',
        name: 'login',
        component: Login
    }
]

const router = new VueRouter({
    routes
})

export default router